home *** CD-ROM | disk | FTP | other *** search
/ MacSilverWare / macsilverware.iso / Education / GraphToolz 1.11 / GraphToolz doc < prev    next >
Text File  |  1986-12-06  |  9KB  |  49 lines

  1.                      INTRODUCTION TO GRAPHTOOLZ (Version 1.11) 
  2.                                by Tom Saxton
  3.  
  4. OVERVIEW:  Functions are entered by selecting “Edit Functions” from the Functions Menu.  After functions have been entered, they may be activated by selecting their names in the Function menu (causing a check mark to appear next to the name).  Selecting “Graph 'em” from the Graph menu will graph all active functions.  Numerical operations such as integration, maximization/minimization, solving the equation f(x) = 0 as well as function evaluation at any value of x may be performed by selecting the appropriate item from the Numerical menu.
  5.  
  6. APPLE MENU:  No surprises here, the usual copyright/ShareWare notice followed by your favorite Desk Accessories.
  7.  
  8. FILE MENU:  With the file menu you may do the usual things.  “Save” and “Save As…” will save the current function definitions in the disk file of your choice.  Such files may be opened later saving the time required to type in your functions.  The "Transfer…" item allows you to jump directly to any other application without going through the Finder.
  9.  
  10. EDIT MENU:  The Edit menu is included largely for use with Desk Accessories.  GraphToolz itself does not support this menu.  Cut and Paste operations are supported within dialog boxes via the Command-Key equivalents.  Any graphs you produce may be copied to the clipboard using the “Copy 2 ClipBoard” command in the “Graph” menu.
  11.  
  12. FUNCTIONS MENU:  The first item, “Edit Functions”, brings up a dialog box which allows functions to be defined.  See below for a discussion of this dialog box.  The remaining items in the menu are the names of the functions.  A dimmed name means that there is not currently a valid definition for that function.  The user may change the name of any function, and the menu will reflect the user-defined name.
  13.  
  14. GRAPH MENU:  “Graph 'em” causes all functions currently selected to be graphed.  Once a function has been graphed, its graph is stored for future use.  This record remains valid until the function or the graph window parameters are altered.  ‘Unchecking’ a function’s name in the Functions menu will not, by itself, cause this record to be lost.  Thus once all of the functions have been graphed once, they may be overlayed in any combination quite quickly.  “Adjust Axes” yields a dialog box which allows the user to reset any of the graph window parameters.  The scales of the x- and y-axes may be altered to suit particular needs.  “Adjust Origin” allows the position of the graph's origin to be moved with a click of the mouse.  “Copy To Clipboard” will copy the current contents of the graph window to the clipboard in PICT format.  The graph may then be transfered to applications such as MacDraw, MacPaint, MacWrite or Microsoft Word for inclusion in other documents.
  15.  
  16. NUMERICAL MENU:  “Solve” allows you to solve the equation f(x) = 0 where f(x) is any of the functions you have defined.  MaxMin allows you to find maxima and minima for any of your functions.  “Integrate” numerically integrates your functions.  Finally, “Evaluate” allows you to evaluate your functions at any values of x.
  17.  
  18. THE “EDIT FUNCTIONS” DIALOG BOX:  Each function is identified internally by an ID number from 1 to 15.  By clicking in the “Next” and “Previous” buttons, (Command-> and Command-<, respectively) you may select any of the functions.  “Function Name” is a user-defined name that identifies the functions as they appear in the Functions Menu.  The function is defined in the field following “f(x) =”.  As this implies, the function must be written as a function of the variable x.  See the discussion below of what sort of things GraphToolz understands.  The domain of the function may be restricted to avoid singularities or to shorten the time involved in the graphing process.  Once a function definition is complete it may be made permanent by clicking the “Accept” button (or htting the Enter key) or discarded by clicking the “Revert” button (or the `-key).  The dialog is exited by clicking the “Exit” button or hitting the Return key.  Cut and Paste operations are supported via their standard command-key equivalents.  Although you cannot cut or paste text to or from other applications or desk accessories.
  19.  
  20. EXPRESSIONS RECOGNIZED BY GRAPHTOOLZ:  GraphToolz understands all of the formula constructs used in languages such as Basic, Fortran, Pascal and C.  Addition, multiplication, subraction and division are represented by the symbols +, *, - and /, respectively.  ÷ also works for division.  Exponentiation my be represented by either ** (as in Fortran) or as ^ as in Basic.  GraphToolz recognizes the three kinds of parentheses available on the Mac keyboard: (), [], and {}, and requires that each opening paren be matched by a closing paren of the same sort.  The usual transcendental functions (most are Axtec C library functions) are built into GraphToolz as: sqrt(), sin(), cos(), tan(), asin(), acos(), atan(), log(), log10(), and exp().  GraphToolz knows what π (option p) is.  GraphToolz also takes vertical bars, |, to mean absolute value.  Since the | acts like a function and a grouping symbol, and there is not a distinct opening and closing symbol (as with [ and ], etc.) care must be taken to ensure there is no possibility of ambiguity.  In particular, be careful when nesting absolute value expressions.  See the examples below:
  21.  
  22. Valid expressions:
  23. f(x) = 4*x**2-6*x+12
  24. f(x) = sqrt([2*x^4+6*x]÷{23*x**2 + 2})
  25. f(x) = sin(x) + exp(cos(π*x))
  26. f(x) = | sin(x) |
  27. f(x) = | sin(x) - | x | |
  28. f(x) = | (|x|) - sin(x) |    (see below)
  29.  
  30. Invalid expressions:
  31. f(x) = 3x-4  (the * is missing in the first term)
  32. f(x) = sin[x]  (round parentheses must be used with the built-in functions)
  33. f(x) = sin (x) (no intervening spaces allowed between function and paren).
  34. f(x) = | |x| - sin(x) | (thinks first two |’s are a grouping pair, see above)
  35.  
  36. The function is read by GraphToolz as soon as the definition is accepted.  Error messages are designed to be as useful as possible (you’ll never see “syntax error”).  An attempt is made to place the caret near the mistake whenever possible.  (“Mismatched parens” usually gets the caret put at the end regardless of where the parens should have been).  For the most part, math errors are ignored, so sqrt(-1) will not generate any error alerts.  Overflows and underflows are also ignored.  In most cases this will be handled by the graphing routines the way you would want.  The numerical routines may return garbage if you include a singularity within the interval you Integrate, Extermize, etc.  It is therefore a good idea to restrict the domains of your functions to avoid singularities and regions where the function makes no sense.
  37.  
  38. HINTS AND TIPS:  The library transcendental functions are rather slow compared to polynomial expressions.  In most cases, this is unavoidable.  However, functions that use exponents can be sped up by writing out the expression.  Thus, x*x*x will compute more quickly than (the mathematically equivalent) x**3 or x^3.  As with entering equations into a computer program, lengthly polynomials should be written using Horner's rule to speed things up.  For example:
  39.  
  40. x^3+2*x^2-3*x+2 = x*x*x+2*x*x-3*x+2 = x*(x*(x+2)-3)+2
  41.  
  42. In the above case, the second expression will evaluate faster than the first, and the third expression fastest of all.
  43.  
  44. If you get bored with watching a function graph, you may type Command-. (period), as with the ImageWriter, to abort the current function.  This will leave the aborted function in the window, but it will not be remembered for future redraws.
  45.  
  46. FUTURE FEATURES:  Multi-Window support, function value tabulation (with disk file support), printing from within the application, more numerical stuff and/or more sophisticated methods of doing the numerical tasks available, user control over the name of the variable (so that you can have functions of variables other than ‘x’), longer function definitions.  Cutting and Pasting of text between applications and desk accessories is also a desirable feature.  This would enable you to store equations in the notebook and splice them into GraphToolz.  I would also be interested in hearing what people who use this program would be like to see.
  47.  
  48. I will continue to enhance this program as long as there is interest in it.  One way to demonstrate your interest is to send in the ShareWare contribution.  To those who register, I will make upgrades available for a nominal cost.
  49.